# Maintainer: Andrzej Giniewicz <gginiu@gmail.com>
# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: shadyabhi <abhijeet.1989@gmail.com>

pkgname=python-google-api-python-client
pkgver=2.86.0
pkgrel=1
pkgdesc="Google API Client Library for Python"
arch=('any')
url="https://github.com/google/google-api-python-client"
license=('Apache')
depends=('python-google-auth-httplib2' 'python-uritemplate' 'python-google-api-core')
optdepends=('python-oauth2client: optional backend')
makedepends=('python-setuptools')
source=("google-api-python-client-${pkgver}.tar.gz::https://github.com/google/google-api-python-client/archive/v${pkgver}.tar.gz")
sha256sums=('659b472816dd5ca6bd6ccd76b93f8ee71056e599b456a809887bc3c7ac76b647')

build() {
  cd "google-api-python-client-${pkgver}"
  python setup.py build
}
 
package() {
  cd "google-api-python-client-$pkgver"
  python setup.py install --skip-build --root="$pkgdir" --optimize=1

  # Workaround for FS#47243
  _site_packages=`python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`
  chmod -R a+r "$pkgdir$_site_packages"
}
